//
//  publishViewController.m
//  YiXiu
//
//  Created by ZHY on 16/6/26.
//  Copyright © 2016年 zzz. All rights reserved.
//

#import "publishViewController.h"
#import "pubVoiseViewController.h"
#import "XMNPhotoCollectionController.h"
#import "FeedbackController.h"

@interface publishViewController ()


@property (nonatomic, strong)  pubVoiseViewController *pubVoise;
@property (nonatomic, strong) FeedbackController *feedback;

@end

@implementation publishViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor grayColor];
    
    
    UIButton * titleIMG = [[UIButton alloc]initWithFrame:CGRectMake(200,KScreenHeight-216-85, 85, 85)];

    [titleIMG setTitle:@"图文" forState:UIControlStateNormal];
    titleIMG.backgroundColor = [UIColor yellowColor];
    [titleIMG setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [titleIMG addTarget:self action:@selector(titImgAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:titleIMG];
    
    UIButton * voiceBTN = [[UIButton alloc]initWithFrame:CGRectMake(160, 200, 100, 100)];
    [voiceBTN setTitle:@"声音" forState:UIControlStateNormal];
    voiceBTN.backgroundColor = [UIColor yellowColor];
    [voiceBTN setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [voiceBTN addTarget:self action:@selector(voiceAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:voiceBTN];
    
}

-(void)titImgAction:(UIButton *)sender
{
    if (!_feedback) {
        _feedback = [[FeedbackController alloc]init];
    }
    
    [self.navigationController pushViewController:_feedback animated:YES];
}

-(void)voiceAction:(UIButton *)sender
{
    
    if (!_pubVoise) {
        _pubVoise = [[pubVoiseViewController alloc]init];
    }
    
    [self presentViewController:_pubVoise animated:YES completion:nil];

}


@end
